import store from "@/store";

/**
 * @export 判断权限
 * @param {*} role
 */
export function check(role) {
  const { roles } = store.getters;

  if (!roles || !roles.length || !role) return true;

  return roles.includes(role);
}